package com.ellricky.baselib.dialog.picker.consultant;


import com.contrarywind.adapter.WheelAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Numeric Wheel adapter.
 */
public class ENumericWheelAdapter implements WheelAdapter {


	private List<Integer> minutes;


	public ENumericWheelAdapter(){
		minutes = new ArrayList<>();
		minutes.add(0);
		minutes.add(30);
	}



	@Override
	public Object getItem(int index) {
		return minutes.get(index);
	}

	@Override
	public int getItemsCount() {
		return minutes.size();
	}
	
	@Override
	public int indexOf(Object o){
		try {
			int item = (int) o;
			if (item == 0) return 0;
			return  1;
		} catch (Exception e) {
			return -1;
		}

	}
}
